<%@taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%--
    This file is an entry point for JavaServer Faces application.
--%>
<f:view>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1><h:outputText value="Dodaj mecz" /></h1>
        <h:form>
            <h:panelGrid columns="2">
                <h:outputText value="Name"/>
                <h:inputText value="#{game.name}"/>
                <h:outputText value="Date"/>
                <h:inputText value="#{game.date}" converter="DateConverter" />
                <h:outputText value="League"/>
                <h:selectOneMenu id="league" value="#{game.league}">
                   <f:selectItems value="#{league.leagues}"/>
                   <f:converter converterId="LeagueConverter" />
                </h:selectOneMenu>
            </h:panelGrid>
            <h:commandButton value="Dodaj" action="#{game.dodaj}"/>
        </h:form>
    </body>
</html>
</f:view>
